package com.naiterui.ehp.bs.pharmacist.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import com.naiterui.ehp.bp.support.security.InterceptorAddition;
import com.naiterui.ehp.bs.pharmacist.interceptor.LoginInterceptor;
import com.naiterui.ehp.bs.pharmacist.interceptor.PasswordExpireInterceptor;
import com.naiterui.ehp.bs.pharmacist.interceptor.VersionInterceptor;

/**
 * @author guoyongxiang
 */
@Configuration
public class PharmacistInterceptorConfig {

    @Bean
    public InterceptorAddition versionInterceptor() {
        return InterceptorAddition.build(new VersionInterceptor()).addPathPatterns("/pharmacist/**");
    }

    @Bean
    public InterceptorAddition phLoginInterceptor() {
        return InterceptorAddition.build(new LoginInterceptor()).addPathPatterns("/pharmacist/**");
    }

    @Bean
    public InterceptorAddition phPasswordExpireInterceptor() {
        return InterceptorAddition.build(new PasswordExpireInterceptor()).addPathPatterns("/pharmacist/**");
    }
}